package org.icsdt.sp.fragments;

import org.icsdt.transacao.Transacao;
import org.icsdt.transacao.TransacaoFragmentTask;
import org.icsdt.utils.AndroidUtils;

import android.app.Fragment;

public class BaseFragment extends Fragment {
    private int progressId = 0;

    protected void alert(int mensagem) {
	AndroidUtils.alertDialog(getActivity(), mensagem);
    }

    // Inicia a thread
    public void startTransacao(Transacao transacao) {
	TransacaoFragmentTask task = new TransacaoFragmentTask(this,transacao, progressId);
	task.execute();
    }

    public void setProgressId(int progressId) {
	this.progressId = progressId;
    }

}
